# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=purple-lurch
_pkgname=lurch
pkgver=0.7.0
pkgrel=0
pkgdesc="OMEMO encryption support for libpurple"
arch="all"
url="https://github.com/gkdr/lurch"
license="GPL-3.0-or-later"
makedepends="
	axc-dev
	libgcrypt-dev
	libomemo-dev
	libpurple-xmpp
	libsignal-protocol-c-dev
	mxml-dev
	pidgin-dev
	sqlite-dev
	"
checkdepends="cmocka-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/gkdr/lurch/archive/v$pkgver.tar.gz
	0001-use-system-libs-for-libomemo-and-axc.patch
	0002-makefile-use-sh-for-test-output-filtering.patch
	"
builddir=$srcdir/$_pkgname-$pkgver

build() {
	make
}

check() {
	make test
}

package() {
	DESTDIR=$pkgdir PREFIX=/usr make install
}
sha512sums="082f85d25fbcb184b7b6d827e1e6bac073ad46064a144ca24245164558ca9e0cdfcdc4187ac3da5f8738e0476e759e67801d0fd24598b31e2d86053f8af576b6  purple-lurch-0.7.0.tar.gz
dbc1f5aae3b9ca03ab91bf0084129bdb5cb82ac969db34cfea4140e80d4a22f230350a8b15727150ae62ce6bbcdce131baee9ed366d01ec0e45598f0da3d8f31  0001-use-system-libs-for-libomemo-and-axc.patch
77ccb4cb4ca737b914b4a34ccd469ceee2b15dcc717d4b868e1d0817397121ac6abeb5f3a326cdf3dbf845b211f9d86ca0ee627385fef80fc3b8b2e72c05f024  0002-makefile-use-sh-for-test-output-filtering.patch"
